package com.ziytek.web.citizen.enums;


import lombok.Getter;

/**
 * 异常码枚举类
 *
 * @author fengh
 */
@Getter
public enum ErrorCode {
    /***/
    SUCCESS(0, "成功"),
    BAD_REQUEST(400, "请求参数错误"),
    UNAUTHORIZED(401, "未授权"),
    INTERNAL_ERROR(500, "服务器内部错误"),
    STEP_NOT_EXIST(10001, "工步方案不存在"),
    SETTING_ISSUED_FAILED(10002, "指令下发失败"),
    CHANNEL_PARAM_ERROR(10003, "通道参数错误"),
    IP_NOT_EXIST(10004, "机柜IP不存在"),
    DEVICE_CONNECT_FAILED(10005, "设备连接失败"),
    SETTING_NOT_EXIST(10006, "指令生成失败"),
    SETTING_ISSUED_EXCEPTION(10007, "指令下发异常"),
    CABINET_NOT_EXIST(20001, "机柜编号不存在"),
    STEP_FAILED(50000, "工步方案或者限制参数错误"),
    CABINET_EXCEPTION(50001, "机柜地址异常"),
    SETTING_LIMIT_PARAM_FAILED(50002, "指令限制参数校验失败"),

    ;

    /***/
    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

}